package algorithms.evictpolicy;

import java.util.HashMap;
import java.util.Map;

public class DefaultCache<K, V> extends AbstractCache<K, V> {

    private Map<K, V> data = new HashMap<>();

    @Override
    public void put(K k, V v) {
        data.put(k, v);
    }

    @Override
    public V get(K k) {
        return data.get(k);
    }

    @Override
    public boolean exists(K k) {
        return data.containsKey(k);
    }

    @Override
    public void remove(K k) {
        data.remove(k);
    }
}
